function logout() {
    if(confirm("确认退出？")) {
        jQuery.ajax({
            url:"/user/logout",
            type:"POST",
            data:{},
            success:function(result) {
                if(result != null && result.code ==200) {
                    location.href = "/login.html";  
                }
            }
        });
    }
}

function getUrlValue(key) {
    var params = location.search;
    if(params.length > 1) {
        params = location.search.substring(1);
        var paramArr = params.split("&");
        for(var i = 0; i < paramArr.length; i ++) {
            var kv = paramArr[i].split("=");
            if(kv[0] = key) {
                return kv[1];
            }
        }
        
    }
    return "";
}
function getMaxPage() {
    var count = 0;
    jQuery.ajax({
        url:"art/artcount",
        type:"POST",
        data:"",
        success:function(result) {
            if(result != null && result.data > 0) {
                
                count =  Math.ceil(result.data/psize);
                
            } else {
                count  = 1;
            }
        }
    })
    return count;
}